-
-
Notifications
You must be signed in to change notification settings - Fork 222
London | 25-ITP-Sep | Adnaan Abo | Sprint 2 | Coursework/sprint 2 #712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Your PR couldn't be matched to an assignment in this module. Please check its title is in the correct format, and that you only have one PR per assignment. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start on this sprint's tasks, I have spotted a few areas where you could improve code further
return bmi; | ||
} | ||
|
||
console.log(calculateBMI(weight, height).toFixed(1)); // should return 26.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BMI calculation has to be to 1 decimal place, according to the specification. You're fixing the position in your log, after the function returns. Is that the best way to implement this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The best practice is letting the function return the BMI formatted to 1 decimal place, rather than having it fixed in the log.
|
||
|
||
function toPounds(penceString) { | ||
const penceStringWithoutTrailingP = penceString.substring( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor issue - I would recommend adding indentation within functions so we can more easily see when we are inside and outside a function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the feedback indentation is now fixed.
Great, thanks for changing this. You are have now completed this task |
Self checklist
completed sprint2 coursework by answering the questions within the tasks fixing the codes and creating functions and testing for functionality.